let vm = new Vue({
    el: "#homeMain",
    data: {
        userLoginInfo: {}
    },
    methods: {
        logout: function () {
            axios({
                url: `user/logout`,
            }).then(res => {
                sessionStorage.clear();
                location.href = "logout";
            })
        }

    },
    created: function () {
        let userInfo = sessionStorage.getItem("vmUserInfo");
        if (userInfo != null) {
            this.userLoginInfo = JSON.parse(userInfo);
        } else {
            location.href = "";
        }
    }
});

